#coding=UTF-8
import requests
import json

# 引入自定义的keystone模块
import keystone
keystone_s=keystone.getToken()

#端点地址：
glance_url="http://192.168.100.10:9292/v2/images/"
#定义请求头
headers={
    "X-Auth-Token":keystone_s['token']
}
image_id="06e9c148-df73-4f01-b0c7-258ead33cc9d"
#发送请求
req=requests.delete(glance_url+image_id,headers=headers)
print(req.status_code)
if req.status_code==202:
    print("删除成功")
